package edu.gatech.fiveminutesleft.storage.sqlite;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DoItSQLiteOpenHelper extends SQLiteOpenHelper {

	public DoItSQLiteOpenHelper(Context context, String dbname) {
		super(context, dbname, null, 1);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		Log.d("DoItSQLiteOpenHelper.onCreate", "");
		db.execSQL("create table pool ( id text primary key not null, data text not null);");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL("drop table if exists pool");
		this.onCreate(db);
	}

}
